<template>
    <p>{{ num }}</p>
    <button @click="addNum">点击</button>
    <p>{{ A.num }}</p>
    <button @click="A.sumNum(num)">点击</button>
</template>

<script lang="ts">
export default {
    name: 'Hello'
}
</script>

<!--setup语法糖-->
<script setup lang="ts">
//引入
import useAdd from '@/hooks/useAdd';
import useSum from '@/hooks/useSum';
import { ref } from 'vue';

const {num,addNum } = useAdd()
const A = useSum()


</script>